package org.codeart.juc.thread;

public class InterruptedDemo {

    public static void main(String[] args) {
        // 打印当前线程是否被打断
        System.out.println(Thread.currentThread().isInterrupted());
        Thread.currentThread().interrupt();
        System.out.println(Thread.currentThread().isInterrupted());
        // 返回当前线程是否被打断，并归为 false
        System.out.println(Thread.interrupted());
        System.out.println(Thread.interrupted());
    }

}
